@use './common/config.scss' as *;
@import './common';
// @import './tasklist';
@import './emoji/emoji';

@mixin editor {


  .ql-editor {
    padding-bottom: 33px;
    font-size: $defaultFontSize;

    &.ql-blank::before {
      color: #8a8e99;
    }


    .ql-ui {
      position: absolute;
      color: #000;
    }


    // 任务列表
    // @include tasklist;


    .ql-file-item {
      margin: 0 4px;
      padding: 0 4px;
      white-space: nowrap;
      max-width: 90%;
      user-select: none;
      vertical-align: middle;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      text-overflow: ellipsis;
      display: inline-block;
      font-size: 14px;
      height: 28px;

      &.icon-file::before {
        position: absolute;
        left: 4px;
        top: 2px;
      }

      span {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
      }

      svg {
        margin-right: 4px;
        fill: #5e7ce0;
        vertical-align: text-bottom;
      }
    }

    // 代码块
    code,
    .ql-code-block-container {
      background-color: #f8f8f8;
      border-radius: 3px;
    }

    code {
      font-size: 85%;
      padding: 2px 4px;
    }

    .ql-code-block-container {
      overflow: auto;
      padding: 9.5px;
      margin: 0 0 10px;
      word-break: normal;
      word-wrap: break-word;
      white-space: pre-wrap;
      font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
      font-size: 13px;
      border-radius: 1px;
      color: #252b3a;
      background-color: #f8f8f8;
      border: 1px solid #adb0b8;
    }


    // 全局链接
    .ql-wiki-link,
    .ql-doc-link {
      display: inline-block;
      margin: 0 5px;
    }

    // 代码块
    blockquote {
      border-left: 4px solid #adb0b8;
      margin-bottom: 5px;
      margin-top: 5px;
      padding-left: 16px;
    }

    // @提醒
    @include mentionLink;
  }
}

// 编辑器正文
@include editor;
// Emoji表情
@include emoji;
// 编辑器外的任务列表
// @include tasklistOutside;
